<template>
  <view class="hello-title">
    <!-- <image :src="avatarUrl" class="avatar"></image>
    <text>你好,{{nickName}}</text> -->
  </view>
</template>

<script>
import {getUserProfileDataToday} from "../../services/healthy-data-service";
import get from 'lodash.get';
export default {
  name: "hello-title",
  data(){
    return {
      avatarUrl:'',
      nickName:'',
    }
  },
  async created() {
    const data = await getUserProfileDataToday();
    console.log(data);
    this.nickName = get(data,"data.data.nickName");
    this.avatarUrl = get(data,"data.data.avatarUrl");
    console.log(this.nickName)
    console.log(this.avatarUrl)
  }
}
</script>

<style lang="less">
  .hello-title{
    display: flex;
    align-items: center;
    .avatar{
      height: 64px;
      width: 64px;
      background: #e5e5e5;
      border-radius: 20px;
      margin-right: 20px;
    }
    text{
      font-size: 34px;
    }
  }
</style>
